function [colNames,dataTable, controlTable]= ScaleData2(colNames,dataTable, controlTable)

means = mean(dataTable);
deviations = std(dataTable);

nCols=size(dataTable,2);
badCols=[];
for L=4:nCols
    if isnan(deviations(L))==true || deviations(L)==0
        badCols=[badCols L];
    else
        dataTable(:,L)=(dataTable(:,L)-means(L))/deviations(L);
    end
end

if (isempty( controlTable)==false )
   for L=4:nCols
%     if isnan(cDeviations(L))==true || deviations(L)==0
%         badCols=[badCols L];
%     else
        controlTable(:,L)=(controlTable(:,L)-means(L))/deviations(L);
%     end
end
end

cols=1:nCols;
cols(badCols)=[];
dataTable=dataTable(:,cols);
controlTable=controlTable(:,cols);
colNames =colNames(cols);
end